package com.cn.wxwinnie.java.io;

import java.io.IOException;

/**
 * @author 潇湘暮雨 E-mail:wxwinnie@hotmail.com
 * 
 * @version 创建时间：2014年3月25日 下午9:28:20
 * 
 */
public class Testbit2 {

	public static void main(String[] args) throws IOException {
		char[] content = CharacterFileWR.readFile("d:/image.txt");
		int length = content.length;
		byte[] content_byte = new byte[length / 32];
		StringBuilder builder = new StringBuilder();
		int n = 0;
		for (int i = 0; i < length; i++) {
			if (n == 8) {
				n = 0;
				builder = new StringBuilder();
			}
			builder.append(content[i]);
			n++;
			content_byte[i] = ImageFileTools.binaryString2Integer(builder
					.toString());
		}
	}

}
